package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-26
 * Time: 8:48
 */
public class Book {
    private String name; //书名
    private String author;//作者
    private String nation;//国籍
    private String type;//书的类型
    private boolean isexist = true;//是否还有存书

    public Book(String name, String author, String nation,String type) {
        this.name = name;
        this.author = author;
        this.nation = nation;
        this.type = type;
    }

    public Book(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public boolean isIsexist() {
        return isexist;
    }

    public void setIsexist(boolean isexist) {
        this.isexist = isexist;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", nation='" + nation + '\'' +
                ", type='" + type + '\'' +
                ", "+((isexist == true)?"还有存书":"没有存书" )+
                '}';
    }
}
